<template>
	<!-- 日志详情 -->
	<view class="loginfo-container">
		<view class="title">{{ info.title }}</view>
		<view class="title">{{ info.date }}</view>
		<view class="title">{{ info.content }}</view>
		<view class="img"><image mode="widthFix" :src="info.imgs"></image></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				info:{}
			}
		},
		onLoad(options) {
			this.id = options.id
		},
		mounted() {
			this.getWorkLogById()
		},
		methods:{
			getWorkLogById() {
				let params = {
					id:this.id
				}
				this.$u.api.getWorkLogById(params)
					.then(res => {
						console.log(res)
						if(res.code == 200) {
							this.info = res.result
						}
					})
					.catch(err => {
						console.log(err)
					})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.loginfo-container{
		background-color: #f5f6f7;
		min-height: 100vh;
		padding: 20rpx;
		.title:nth-child(1) {
			color: #000;
			font-size: 28rpx;
			padding: 10rpx 0;
			width: 100%;
			text-align: left;
		}
		.title:nth-child(2) {
			color: #999;
			font-size: 25rpx;
			padding: 10rpx 0;
			width: 100%;
			text-align: left;
		}
		.title:nth-child(3) {
			color: #333;
			font-size: 26rpx;
			padding: 10rpx 0;
			width: 100%;
			text-align: left;
			text-indent: 2em;
			word-wrap: break-word;
			margin-bottom: 10rpx;
		}
		.img{
			width: 100%;
			image{
				width: 100%;
			}
		}
	}
</style>
